<?php
defined('IN_IXDCW') or exit('Access Denied');
include tpl('header');
show_menu($menus);
?>
	<form action="?">
		<div class="tt">版本管理</div>
		<input type="hidden" name="moduleid" value="<?php echo $moduleid;?>"/>
		<input type="hidden" name="file" value="<?php echo $file;?>"/>
		<input type="hidden" name="action" value="<?php echo $action;?>"/>
		<input type="hidden"  name="did" value="<?php echo $did;?>"/>
		<table cellpadding="2" cellspacing="1" class="tb">
			<tr>
				<td>&nbsp;

					<?php echo ajax_area_select('areaid', '所在地区', $areaid);?>&nbsp;

					<?php echo $size_select;?>&nbsp;
					<input type="checkbox" name="thumb" value="1"<?php echo $thumb ? ' checked' : '';?>/>图片&nbsp;
					<input type="text" name="psize" value="<?php echo $pagesize;?>" size="2" class="t_c" title="条/页"/>
					<input type="submit" value="搜 索" class="btn"/>&nbsp;
					<input type="button" value="重 置" class="btn" onclick="window.location='?moduleid=<?php echo $moduleid;?>&file=<?php echo $file;?>&action=<?php echo $action;?>';"/>

				</td>
			</tr>
			<tr>
				<td>&nbsp;
					<?php echo dcalendar('fromtime', $fromtime);?> 至 <?php echo dcalendar('totime', $totime);?>&nbsp;
					会员名：<input type="text" name="username" value="<?php echo $username;?>" size="10"/>&nbsp;
					会员ID：<input type="text" name="uid" value="<?php echo $uid;?>" size="10"/>&nbsp;
				</td>
			</tr>
		</table>
	</form>
	<form method="post">
		<div class="tt">版本管理</div>
		<table cellpadding="2" cellspacing="1" class="tb">
			<tr>
				<th width="25"><input type="checkbox" onclick="checkall(this.form);"/></th>
				<th>ID</th>
				<th>主要版本</th>
				<th>摘要</th>
				<th>内容</th>
				<th>公司LOGO</th>

				<th>公司规模</th>
				<th>注册资本</th>
				<th>注册年份</th>
				<th>是否审核</th>
				<th width="100">操作</th>
			</tr>
			<?php foreach ($lists as $k => $v) { ?>
				<tr onmouseover="this.className='on';" onmouseout="this.className='';" align="center">
					<td>
						<input type="checkbox" name="eid[]" value="<?php echo $v['eid'];?>"/>
						<input type="hidden"  name="did" value="<?php echo $v['did'];?>"/>
					</td>
					<td><?php echo $v['eid'];?></td>
					<td><?php echo $v['eid']==$mainEdition ? '●' : '-' ;?></td>
					<td><?php echo Str::cut($v['summary'],20);?></td>
					<td><?php echo Str::cut($v['content'],20);?></td>
					<td><img src="<?php echo $v['company_thumb'];?>" width="40" height="40" title="标题图,点击预览" alt=""/></td>

					<td><?php echo $v['company_size'] ? $sizes[$v['company_size']]  : '-';?></td>
					<td><?php echo $v['company_money'] ? $v['company_money'] . $v['company_unit']  : '-';?></td>
					<td><?php echo $v['company_money'] ? $v['company_year'].'年' : '-';?></td>
					<td><?php echo $v['audit'] ? '●' : '-' ;?></td>
					<td>
						<a href="/company/show.php?eid=<?php echo $v['eid'];?>"><img src="admin/image/view.png" width="16" height="16" title="预览" alt=""/></a>
						<a href="?moduleid=4&file=edition&action=delete&eid=<?php echo $v['eid'];?>&did=<?php echo $v['did'];?>" onclick="return _delete();"><img src="admin/image/delete.png" width="16" height="16" title="删除" alt=""/></a>
					</td>
				</tr>
			<?php }?>
		</table>
		<div class="btns">
			<input type="submit" value=" 设为主要 " class="btn" onclick="if(confirm('确定要将选中版本设为主页显示版本吗？')){this.form.action='?moduleid=4&file=edition&action=lead'}else{return false;}"/>&nbsp;
			<input type="submit" value=" 审核通过 " class="btn" onclick="if(confirm('确定要将选中版本通过审核吗？')){this.form.action='?moduleid=4&file=edition&action=audit&audit=1'}else{return false;}"/>&nbsp;
			<input type="submit" value=" 取消审核 " class="btn" onclick="if(confirm('确定要将选中版本取消审核吗？')){this.form.action='?moduleid=4&file=edition&action=audit&audit=0'}else{return false;}"/>&nbsp;
			<input type="submit" value=" 删除版本 " class="btn" onclick="if(confirm('确定要删除选中版本吗？')){this.form.action='?moduleid=4&file=edition&action=delete'}else{return false;}"/>&nbsp;
			<input type="submit" value=" 版本对比 " class="btn" onclick="if(confirm('确定要对比选中版本吗？')){this.form.action='?moduleid=4&file=edition&action=compare'}else{return false;}"/>&nbsp;

		</div>
	</form>
	<div class="pages"><?php echo  $do->getPn()->render();?></br>
	<span>共<?php echo $items;?>条/<?php echo $do->getPn()->getPages();?>页&nbsp;
		<?php if ($do->getPn()->getPages()>1){;?>
		到第</span>
		<input type="text" name="page-num-input" id="xd_page_jump"/>
		<span>页</span>
		<button type="submit" onclick="xdChangeAndLocation('page', $('#xd_page_jump').val())">确定</button>
		<?php };?></div>
	<br/>
	<script type="text/javascript">Menuon(0);</script>
<?php include tpl('footer'); ?>